package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 部门表 sys_dept
 *
 * @author ruoyi
 */
public class SysDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */
    private Long deptId;

    /** 父部门ID */
    private Long parentId;

    /** 祖级列表 */
    private String ancestors;

    /** 部门名称 */
    private String deptName;

    /** 显示顺序 */
    private Integer orderNum;

    /** 负责人 */
    private String leader;

    /** 联系电话 */
    private String phone;

    /** 邮箱 */
    private String email;

    /** 部门状态:0正常,1停用 */
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 父部门名称 */
    private String parentName;

    /** 机构等级 1一级机构 2 二级机构(部门) 3 水产机构 */
    private Integer deptLevel;

    /** 机构类型 0平台用户 1 监管用户 2 企业用户 3 个人用户 */
    private Integer deptType;

    /** 监管机构 */
    private Long deptApprovalId;

    /** 用户来源 0 自行注册 1 批量导入 3 接口获得 4  数据迁移 10 bas1 20 base2 */
    private Integer deptUserSource;

    /** 证件类型：1:身份证；2:护照；3:港澳通行证；4、营业执照 */
    private Integer cardType;

    /** 证件号 */
    private String cardId;

    /** vip等级预留 */
    private Long vipLevel;

    /** 总积分（信用积分） */
    private double creditIntegralAmt;

    /** 实人认证方式0:未认证;1：接口认证2：人工审核认证 */
    private Integer authMode;

    /** 防串货状态 0停用 1启用 */
    private Integer consignmentStatus;

    /** 业务类型（1蔬菜种植 2水果种植 3畜禽养殖 4禽蛋养殖 5水产养殖 6农资经营 7 供应商 8 畜牧饲料兽药店 0其他） */
    private String subjectType;

    /** 主体类型 1规模化主体 2散户 */
    private Integer enterpriseType;

    /** 所属省市区id 0 全国 */
    private Long areaCode;

    /** 是否默认 0默认 1不默认（默认1） */
    private Integer isDefault;

    /** 监管单位所属地域  根据地区表填值 */
    private Long deptApprovalAreaCode;

    /** 证件照正面 */
    private String anthenticationJustImage;

    /** 证件照反面 */
    private String anthenticationBackImage;

    /** 经度 */
    private Double LONGITUDE;

    /** 纬度 */
    private Double LATITUDE;

    /** 营业执照注册号 */
    private String licenseMark;

    /** 营业执照正面 */
    private String businessLicenseJustImage;

    /** 在营状态 1 在营 2不在营 */
    private Integer businessStatus;

    /** 版本号 */
    private Long VERSION;

    /** 经营类型 0 其它 1专业大户 2家庭农场 3农民合作社 4龙头企业 */
    private Integer managementType;

    /** 工商类型 1有限责任公司 2股份有限公司 3股份合作公司 4国有企业 5 集体所有制 6个体工商户 7投资企业 8有限合作 9普通合作 10外商投资企业 11 港、澳、台投资企业 12联营企业 13 私营企业 14独资企业 15散户 0其他 */
    private Integer businessType;

    /** 过期时间 */
    private String expiredDate;

    /** 审核状态 0审核中 1通过 2失败 */
    private Integer approvalStatus;

    /** 原因 */
    private String REASON;

    /** 是否长期有效 0否 1是 */
    private Integer isLongTerm;

    /** 排序 */
    private Long sortNum;

    /** 机构电子签章 */
    private String deptSign;

    /** 可以被检查的检查类型(多个用，隔开)，如果为空则全部都可查 */
    private String inspectType;

    /** 产品类型1农大咖 */
    private String productType;

    /** 是否参与监管 0 ：否 1：是 */
    private Long isInspect;

    /** 是否有标签 */
    private String isHaveLabel;

    /** 人脸id */
    private String faceId;

    private String updateUser;
    private String createUser;
    private String deptApprovalName;

    private String userName;

    private Integer updateType;

    public Integer getUpdateType() {
        return updateType;
    }

    public void setUpdateType(Integer updateType) {
        this.updateType = updateType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /** 子部门 */
    private List<SysDept> children = new ArrayList<SysDept>();

    public Long getDeptId()
    {
        return deptId;
    }

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public String getAncestors()
    {
        return ancestors;
    }

    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    @NotBlank(message = "部门名称不能为空")
    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
    public String getDeptName()
    {
        return deptName;
    }

    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    @NotNull(message = "显示顺序不能为空")
    public Integer getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }

    public String getLeader()
    {
        return leader;
    }

    public void setLeader(String leader)
    {
        this.leader = leader;
    }

    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getParentName()
    {
        return parentName;
    }

    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }

    public List<SysDept> getChildren()
    {
        return children;
    }

    public void setChildren(List<SysDept> children)
    {
        this.children = children;
    }


    public Integer getDeptLevel() {
        return deptLevel;
    }

    public void setDeptLevel(Integer deptLevel) {
        this.deptLevel = deptLevel;
    }

    public Integer getDeptType() {
        return deptType;
    }

    public void setDeptType(Integer deptType) {
        this.deptType = deptType;
    }

    public Long getDeptApprovalId() {
        return deptApprovalId;
    }

    public void setDeptApprovalId(Long deptApprovalId) {
        this.deptApprovalId = deptApprovalId;
    }

    public Integer getDeptUserSource() {
        return deptUserSource;
    }

    public void setDeptUserSource(Integer deptUserSource) {
        this.deptUserSource = deptUserSource;
    }

    public Integer getCardType() {
        return cardType;
    }

    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public Long getVipLevel() {
        return vipLevel;
    }

    public void setVipLevel(Long vipLevel) {
        this.vipLevel = vipLevel;
    }

    public double getCreditIntegralAmt() {
        return creditIntegralAmt;
    }

    public void setCreditIntegralAmt(double creditIntegralAmt) {
        this.creditIntegralAmt = creditIntegralAmt;
    }

    public Integer getAuthMode() {
        return authMode;
    }

    public void setAuthMode(Integer authMode) {
        this.authMode = authMode;
    }

    public Integer getConsignmentStatus() {
        return consignmentStatus;
    }

    public void setConsignmentStatus(Integer consignmentStatus) {
        this.consignmentStatus = consignmentStatus;
    }

    public String getSubjectType() {
        return subjectType;
    }

    public void setSubjectType(String subjectType) {
        this.subjectType = subjectType;
    }

    public Integer getEnterpriseType() {
        return enterpriseType;
    }

    public void setEnterpriseType(Integer enterpriseType) {
        this.enterpriseType = enterpriseType;
    }

    public Long getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(Long areaCode) {
        this.areaCode = areaCode;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public Long getDeptApprovalAreaCode() {
        return deptApprovalAreaCode;
    }

    public void setDeptApprovalAreaCode(Long deptApprovalAreaCode) {
        this.deptApprovalAreaCode = deptApprovalAreaCode;
    }

    public String getAnthenticationJustImage() {
        return anthenticationJustImage;
    }

    public void setAnthenticationJustImage(String anthenticationJustImage) {
        this.anthenticationJustImage = anthenticationJustImage;
    }

    public String getAnthenticationBackImage() {
        return anthenticationBackImage;
    }

    public void setAnthenticationBackImage(String anthenticationBackImage) {
        this.anthenticationBackImage = anthenticationBackImage;
    }

    public Double getLONGITUDE() {
        return LONGITUDE;
    }

    public void setLONGITUDE(Double LONGITUDE) {
        this.LONGITUDE = LONGITUDE;
    }

    public Double getLATITUDE() {
        return LATITUDE;
    }

    public void setLATITUDE(Double LATITUDE) {
        this.LATITUDE = LATITUDE;
    }

    public String getLicenseMark() {
        return licenseMark;
    }

    public void setLicenseMark(String licenseMark) {
        this.licenseMark = licenseMark;
    }

    public String getBusinessLicenseJustImage() {
        return businessLicenseJustImage;
    }

    public void setBusinessLicenseJustImage(String businessLicenseJustImage) {
        this.businessLicenseJustImage = businessLicenseJustImage;
    }

    public Integer getBusinessStatus() {
        return businessStatus;
    }

    public void setBusinessStatus(Integer businessStatus) {
        this.businessStatus = businessStatus;
    }

    public Long getVERSION() {
        return VERSION;
    }

    public void setVERSION(Long VERSION) {
        this.VERSION = VERSION;
    }

    public Integer getManagementType() {
        return managementType;
    }

    public void setManagementType(Integer managementType) {
        this.managementType = managementType;
    }

    public Integer getBusinessType() {
        return businessType;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    public String getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(String expiredDate) {
        this.expiredDate = expiredDate;
    }

    public Integer getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(Integer approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    public String getREASON() {
        return REASON;
    }

    public void setREASON(String REASON) {
        this.REASON = REASON;
    }

    public Integer getIsLongTerm() {
        return isLongTerm;
    }

    public void setIsLongTerm(Integer isLongTerm) {
        this.isLongTerm = isLongTerm;
    }

    public Long getSortNum() {
        return sortNum;
    }

    public void setSortNum(Long sortNum) {
        this.sortNum = sortNum;
    }

    public String getDeptSign() {
        return deptSign;
    }

    public void setDeptSign(String deptSign) {
        this.deptSign = deptSign;
    }

    public String getInspectType() {
        return inspectType;
    }

    public void setInspectType(String inspectType) {
        this.inspectType = inspectType;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public Long getIsInspect() {
        return isInspect;
    }

    public void setIsInspect(Long isInspect) {
        this.isInspect = isInspect;
    }

    public String getIsHaveLabel() {
        return isHaveLabel;
    }

    public void setIsHaveLabel(String isHaveLabel) {
        this.isHaveLabel = isHaveLabel;
    }

    public String getFaceId() {
        return faceId;
    }

    public void setFaceId(String faceId) {
        this.faceId = faceId;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }


    public String getDeptApprovalName() {
        return deptApprovalName;
    }

    public void setDeptApprovalName(String deptApprovalName) {
        this.deptApprovalName = deptApprovalName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("deptId", getDeptId())
                .append("parentId", getParentId())
                .append("ancestors", getAncestors())
                .append("deptName", getDeptName())
                .append("orderNum", getOrderNum())
                .append("leader", getLeader())
                .append("phone", getPhone())
                .append("email", getEmail())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
